Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp: assume --reflink=always on no value #3992

Merged
merged 7 commits into from
Oct 3, 2022

Conversation

sssemil
Copy link
Contributor

@sssemil sssemil commented Sep 29, 2022

Set the value of --reflink to always if it's specified without one.

This also changes the behavior of the bad case. The test has been updated, but this creates a difference in behavior:

GNU

$ cp --reflink=bad f g

cp: invalid argument ‘bad’ for ‘--reflink’
Valid arguments are:
  - ‘auto’
  - ‘always’
  - ‘never’
Try 'cp --help' for more information.

uutils

$ .../coreutils/target/debug/coreutils cp --reflink=bad f g
error: "bad" isn't a valid value for '--reflink[=<WHEN>...]'
        [possible values: auto, always, never]

For more information try --help

If this is an issue, I can try fixing this as well.

Closes #3984.

@sylvestre
Copy link
Contributor

difference in behavior
you mean different error message?

@sssemil
Copy link
Contributor Author

sssemil commented Oct 3, 2022

difference in behavior you mean different error message?

yes

@tertsdiepraam
Copy link
Member

I've been meaning to start a more general discussion on this, but in my opinion we don't need to match errors exactly.

@sssemil
Copy link
Contributor Author

sssemil commented Oct 3, 2022

Is this one good to go for now? @tertsdiepraam @sylvestre

@sylvestre sylvestre merged commit a7b637b into uutils:main Oct 3, 2022
@sylvestre
Copy link
Contributor

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cp: --reflink with no argument should be assumed --reflink=always
3 participants